package cn.hhchat.weekly.database;

import cn.hhchat.wp.entity.RoleEntity;
import cn.hhchat.wp.entity.UserEntity;
import cn.hhchat.wp.enums.GradeEnum;
import cn.hhchat.wp.enums.SexEnum;
import cn.hhchat.wp.service.RoleService;
import cn.hhchat.wp.service.UserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.Date;

/**
 * Created this one by HMH on 2017/10/22.
 */
@SpringBootTest
@RunWith(SpringRunner.class)
public class CreateRole {

    @Autowired
    private UserService userService;

    @Autowired
    private RoleService roleService;

    @Test
    public void createRootUser() {
        roleService.save(new RoleEntity("学生"));
        roleService.save(new RoleEntity("教师"));
        roleService.save(new RoleEntity("用户"));
        roleService.save(new RoleEntity("管理员"));
        roleService.save(new RoleEntity("系统管理员"));
    }

}
